import { ref } from 'vue'
import PageContent from '@/base-ui/page-content'

export function usePageSearch() {
  const pageContentRef = ref<InstanceType<typeof PageContent>>()
  // 搜索查询数据
  const handleQuerySubmit = (queryInfo: any) => {
    pageContentRef.value?.getPageData(queryInfo)
  }
  // 重置查询第一页数据
  const handleResetClick = () => {
    pageContentRef.value?.getPageData()
  }
  return {
    pageContentRef,
    handleQuerySubmit,
    handleResetClick
  }
}
